package com.haolijun.eecms.controller.form;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

/**
 * @ClassName InsertActiveForm
 * @Description TODO
 * @Author hljstart
 * @Date 2023/3/12 11:13
 * @Version 1.0
 */
@Data
public class InsertActiveForm {

    @NotBlank(message = "title不能为空")
    @Schema(description = "活动标题")
    private String title;

    @NotBlank(message = "content不能为空")
    @Schema(description = "活动内容")
    private String content;

    @NotBlank(message = "startTime不能为空")
//    @Pattern(regexp = "^((((1[6-9]|[2-9]\\d)\\d{2})-(0?[13578]|1[02])-(0?[1-9]|[12]\\d|3[01]))|(((1[6-9]|[2-9]\\d)\\d{2})-(0?[13456789]|1[012])-(0?[1-9]|[12]\\d|30))|(((1[6-9]|[2-9]\\d)\\d{2})-0?2-(0?[1-9]|1\\d|2[0-8]))|(((1[6-9]|[2-9]\\d)(0[48]|[2468][048]|[13579][26])|((16|[2468][048]|[3579][26])00))-0?2-29-))$", message = "startTime内容不正确")
    @Schema(description = "开始日期")
    private String startTime;

    @NotBlank(message = "endTime不能为空")
   // @Pattern(regexp = "^((((1[6-9]|[2-9]\\d)\\d{2})-(0?[13578]|1[02])-(0?[1-9]|[12]\\d|3[01]))|(((1[6-9]|[2-9]\\d)\\d{2})-(0?[13456789]|1[012])-(0?[1-9]|[12]\\d|30))|(((1[6-9]|[2-9]\\d)\\d{2})-0?2-(0?[1-9]|1\\d|2[0-8]))|(((1[6-9]|[2-9]\\d)(0[48]|[2468][048]|[13579][26])|((16|[2468][048]|[3579][26])00))-0?2-29-))$", message = "endTime内容不正确")
    @Schema(description = "截止日期")
    private String endTime;
}
